package com.cmccgz.udacs_landlord_webapp.bean;

import android.content.Context;

import com.cmccgz.udacs_landlord_webapp.base.AppConfig;

import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;

/**
 * @author: Huang
 * @Descripion:
 * @date 2017/6/16 15:12
 */

public class RequestBean implements Serializable {

    private AuthBean auth;
    private String api_ver;
    private Map<String,Object> req;

    public static RequestBean instance(Context context){
        return new RequestBean(context);
    }

    public static RequestBean instance(Context context,String mobile){
        return new RequestBean(context,mobile);
    }

    private RequestBean(Context context) {
        this.auth = new AuthBean(context);
        this.api_ver = AppConfig.API_VERSION;
        this.req = new HashMap();
    }

    private RequestBean(Context context,String mobile){
        this.auth = new AuthBean(context,mobile);
        this.api_ver = AppConfig.API_VERSION;
        this.req = new HashMap();
    }

    public RequestBean addReqParams(String key,Object value){
        req.put(key,value);
        return this;
    }

}
